// 该文件专门用于创建整个应用的路由器
import VueRouter from "vue-router";

// 引入组件
import Home from '../views/Home.vue'
import About from '../views/About.vue'
import News from '../views/News.vue'
import Message from '../views/Message.vue'

//创建并暴露一个路由器
export default new VueRouter({
    routes: [{
            path: '/Home',
            name: 'home',
            component: Home,
            children: [{
                    path: 'News',
                    name: 'News',
                    component: News,
                },
                {
                    path: 'Message',
                    name: 'Message',
                    component: Message,
                },
            ]
        },
        {
            path: '/About',
            name: 'about',
            component: About
        }
    ]
})